#include<iostream>
using namespace std;
#include<vector>


class Solution {
public:
    void dfs(vector<int>& x, vector<int>& y, vector<int>& z, int n)
    {
        if (n == 1)
        {
            z.push_back(x.back());
            x.pop_back();
            return;
        }
        dfs(x, z, y, n - 1);
        z.push_back(x.back());
        x.pop_back();
        dfs(y, x, z, n - 1);

    }
    void hanota(vector<int>& A, vector<int>& B, vector<int>& C) {
        int n = A.size();
        dfs(A, B, C, n);
    }
};

int main()
{
    vector<int> v1 = {2, 1, 0 };
    vector<int> v2;
    vector<int> v3;
    Solution s;
    s.hanota(v1, v2, v3);
    return 0;
}